package com.note.simpleadmin.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;

/***
 *@ClaseName:TbColumn
 *
 *@Decription:
 *
 *@Author: xubingbing
 *
 *@Date:2019/1/27 0027 14:14
 */
@Entity
@Table(name = "tb_column", schema = "simpleshop", catalog = "")
public class TbColumn implements Serializable {
    private String id;
    private String name;
    private String logo;
    private Integer isDelete;
    private Integer sort;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "logo")
    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "sort")
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbColumn tbColumn = (TbColumn) o;
        return id == tbColumn.id &&
                Objects.equals(name, tbColumn.name) &&
                Objects.equals(logo, tbColumn.logo) &&
                Objects.equals(isDelete, tbColumn.isDelete) &&
                Objects.equals(sort, tbColumn.sort);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, logo, isDelete, sort);
    }
}
